tar xf ${DOWNLOADDIR}/tcl8.6.14-src.tar.gz -C ${BUILDDIR}
pushd ${BUILDDIR}/tcl8.6.14
    SRCDIR=$(pwd)
    pushd unix
	    ./configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/share/man \
	                --build=${CROSS_HOST} --host=${CROSS_TARGET} --enable-64bit
	    make ${JOBS}
	    sed -i -e "s|$SRCDIR/unix|${SYSDIR}/sysroot/usr/lib64|" \
	           -e "s|$SRCDIR|${SYSDIR}/sysroot/usr/include|" \
	           -e "/TCL_INCLUDE_SPEC/s|/usr/include|${SYSDIR}/sysroot/usr/include|" \
	           tclConfig.sh
	    sed -i -e "s|$SRCDIR/unix/pkgs/tdbc1.1.7|${SYSDIR}/sysroot/usr/lib64/tdbc1.1.7|" \
               -e "s|$SRCDIR/pkgs/tdbc1.1.7/generic|${SYSDIR}/sysroot/usr/include|"    \
               -e "s|$SRCDIR/pkgs/tdbc1.1.7/library|${SYSDIR}/sysroot/usr/lib64/tcl8.6|" \
               -e "s|$SRCDIR/pkgs/tdbc1.1.7|${SYSDIR}/sysroot/usr/include|"            \
               pkgs/tdbc1.1.7/tdbcConfig.sh
	    sed -i -e "s|$SRCDIR/unix/pkgs/itcl4.2.4|${SYSDIR}/sysroot/usr/lib64/itcl4.2.4|" \
               -e "s|$SRCDIR/pkgs/itcl4.2.4/generic|${SYSDIR}/sysroot/usr/include|"    \
               -e "s|$SRCDIR/pkgs/itcl4.2.4|${SYSDIR}/sysroot/usr/include|"            \
               pkgs/itcl4.2.4/itclConfig.sh
	    unset SRCDIR
	    make DESTDIR=${SYSDIR}/sysroot install
	    make DESTDIR=${SYSDIR}/sysroot install-private-headers
	    ln -sfv tclsh8.6 ${SYSDIR}/sysroot/usr/bin/tclsh
	popd
popd
